package day10;

public /*final*/ class Some {

	public final int some = 10;

	public final void doSome() {
		System.out.println("Some.doSome()");
	}

	public static void main(String[] args) {
		Other o = new Other();
		o.doSome();

		//		final int x = 10;
		// The final local variable x cannot be assigned. It must be blank and not using a compound assignment
		//		x = 20;
		//
		//		final int y;
		//		y = 10;
		//		y = 20;
		Some s = new Some();
		// s.some = 20;

	}

}

// The type Other cannot subclass the final class Some
class Other extends Some {

	// Cannot override the final method from Some
	// @Override
	public void doSome(int a) {
		System.out.println("Other.doSome()");
		System.out.println(new Some().some);
		//		new Some().some = 20;
	}

}